package com.example.topguli;

import java.util.concurrent.CountDownLatch;

public class CountDownLatchTest {
    public static void main(String[] args) throws InterruptedException {
        CountDownLatch countDownLatch = new CountDownLatch(3);
        for (int i = 0; i < 3; i++) {
            new Thread(()->{
                countDownLatch.countDown();
            }).start();
        }
        countDownLatch.await();
        System.out.println("countdownlatch结束");
    }
}
